|
|
Instead of bounding, try use #if directive and cut off
objects too distant from camera, something like:
#declare MaximumDistance= something
#declare CameraPos= <bla, bla, bla>
#macro dist(v1, v2)
#local dx=v2.x-v1.x;
#local dy=v2.y-v1.y;
#local dz=v2.z-v1.z;
( sqrt(dx*dx + dy*dy +dz*dz) )
#end
...
#declare Building1=
object {
...
}
#declare Building1pos= <bla, bla, bla>
#if (dist(CameraPos, Building1Pos) < MaximumDistance)
object { Building1 translate Building1pos }
#end
Maybe I make some mistake in syntax, but idea is clear, hopefully
Or you can enclose entire object definition in #if statement,
you will then improve parsing time too.
Disnel
E-Mail: dis### [at] itamcascz
Homepage: http://www.itam.cas.cz/~disnel
ICQ: 20126042
Post a reply to this message
|
|